package com.ztgf.pay.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.pay.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.pay.mapper.PayOrderMotherMapper;
import com.ztgf.pay.models.service.IPayOrderMotherService;
import com.ztgf.pay.models.bo.PayOrderMotherSaveBO;
import com.ztgf.pay.models.dto.PayOrderMotherDTO;

/**
 * 支付母订单控制器
 *
 * @author mxli
 * @Date 2020-07-30 12:13:03
 */
@DubboService
public class PayOrderMotherServiceImpl extends ServiceImpl<PayOrderMotherMapper, PayOrderMotherDTO> implements IPayOrderMotherService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(PayOrderMotherSaveBO saveBO) {
        PayOrderMotherDTO dto = new PayOrderMotherDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
